package com.csair.irp.job.file.base;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.HashMap;
import java.util.Map;

/**
 * @Auther: liaolonglong
 * @Date: 2019/1/24 16:31
 * @Description:
 */
public class BaseServiceImpl<M extends BaseMapper<T>, T> extends ServiceImpl<M,T> {

    /**
     * 根据数据文件ID删除数据
     * @param column
     * @param fileId
     * @return
     */
    public boolean clearDataByFileId(String column,Long fileId){
        Map<String, Object> columnMap = new HashMap<>(1);
        columnMap.put(column, fileId);
        return removeByMap(columnMap);
    }
}
